﻿<!DOCTYPE html>

<html>
<head>
    <title>Connexion</title>
</head>
<body>
    @using DevExpress.Web.Mvc.UI;
    @using System.Web.UI.WebControls;
    @model RPSImporter.Models.LogInModel
           
    @{
        //Layout = "~/Views/Shared/_Layout.cshtml";
    }
    <div>
            <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
            <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
            <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
            <table width="100%">
                <tr>
                    <td colspan="3">
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                    <td align="center">
                        @{                               
                            Html.DevExpress().RoundPanel(roundPanelSettings =>
                            {
                                roundPanelSettings.Name = "LoginRoundPanel";
                                roundPanelSettings.HeaderText = "Connexion";
                                roundPanelSettings.Width = Unit.Pixel(530);
                                roundPanelSettings.Styles.Header.HorizontalAlign = HorizontalAlign.Center;
                                roundPanelSettings.SetContent(() =>
                                {
                                    using (Html.BeginForm("LogIn", "LogIn", FormMethod.Post))
                                    {
                                        Html.ValidationSummary(true);
                                        ViewContext.Writer.Write("<div class=\"editor-label\" align=\"center\">");
                                        ViewContext.Writer.Write(Html.LabelFor(model => model.UserName).ToHtmlString());
                                        ViewContext.Writer.Write("</div>");
                                        ViewContext.Writer.Write("<div class=\"editor-field\" align=\"center\">");
                                        ViewContext.Writer.Write(Html.EditorFor(model => model.UserName).ToHtmlString());
                                        ViewContext.Writer.Write("</div>");
                                        ViewContext.Writer.Write("<div class=\"editor-label\" align=\"center\">");
                                        ViewContext.Writer.Write(Html.LabelFor(model => model.UserPass).ToHtmlString());
                                        ViewContext.Writer.Write("</div>");
                                        ViewContext.Writer.Write("<div class=\"editor-field\" align=\"center\">");
                                        ViewContext.Writer.Write(Html.EditorFor(model => model.UserPass).ToHtmlString());
                                        ViewContext.Writer.Write("</div>");
                                        ViewContext.Writer.Write("<div class=\"editor-label\" align=\"center\">");
                                        Html.DevExpress().Label(labelSettings =>
                                        {
                                            labelSettings.Name = "LogInError";
                                            labelSettings.Text = Model.LogInError;
                                            labelSettings.ControlStyle.ForeColor = System.Drawing.Color.Red;
                                        }).Render();
                                        ViewContext.Writer.Write("</div>");
                                        ViewContext.Writer.Write("<div class=\"editor-field\" align=\"center\">");
                                        ViewContext.Writer.Write("<input type=\"submit\" value=\"Connexion\">");
                                        ViewContext.Writer.Write("</div>");
                                    }
                                });
                            }).Render();
                        }
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td colspan="3">
                        &nbsp;
                    </td>
                </tr>
            </table>
    </div>
</body>
</html>
